package com.pingan.agentbank.aaos.testme;

import com.pingan.agentbank.aaos.pojo.ApproFileInfo;
import com.pingan.agentbank.aaos.pojo.ApproLineInfo;
import com.pingan.vframe.sdo.ServiceData;
import com.pingan.vframe.util.StringUtil;
import org.junit.Test;

public class Script1Test {

    @Test
    public void method1(){
        ApproLineInfo approLineInfo = new ApproLineInfo();
        ServiceData serviceData = new ServiceData();

        String empPhoneAreaNo = approLineInfo.getEmployer_phone_areano();
        String empPhone = approLineInfo.getEmployer_phone();
        if (empPhoneAreaNo!=null&&!"".equals(empPhoneAreaNo)){
            empPhone = empPhoneAreaNo + "-" + empPhone;
        }

    }

    @Test
    public void method2(){

        String str1 = "";
        String str2 = null;

        if (str1!=null&&!"".equals(str1)){
            System.out.println(1);
        }
        if (str2!=null&&!"".equals(str2)){
            System.out.println(1);
        }
    }

    @Test
    public void method3(){

        String channel_id = "";
        ApproLineInfo approLineInfo = new ApproLineInfo();
        ServiceData serviceData = new ServiceData();
        String owning_branch = "";
        if (channel_id.equals("WX")){
            owning_branch = "0001";
        } else if (channel_id.equals("FH")){
            if (StringUtil.isEmpty(serviceData.getString("third_sub_branch"))){
                owning_branch = serviceData.getString("third_sub_branch");
            }
            if (StringUtil.isEmpty(serviceData.getString("second_sub_branch"))){
                owning_branch = serviceData.getString("second_sub_branch");
            }
            if (StringUtil.isEmpty(serviceData.getString("first_sub_branch"))){
                owning_branch = serviceData.getString("first_sub_branch");
            }
        }

    }
}
